package com.music.model;

import java.util.ArrayList;

import com.music.observer.Observable;
import com.music.observer.Observer;

public abstract class AbstractModel implements Observable{

	private ArrayList<Observer> listObserver = new ArrayList<Observer>();

	//Methodes à ajouter (recherche, suppression, ajout ...)
	public abstract void search(String s, String opt);
	
	
	//Methodes de Observable
	public void addObserver(Observer obs) {
		this.listObserver.add(obs);
	}
	public void notifyObserver(String str) {
		for(Observer obs : listObserver)
			obs.update(str);
	}
	public void removeObserver() {
		listObserver = new ArrayList<Observer>();
	}
}
